<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<c:choose>
<c:when test="${not empty sal }">
<!-- 사원 -->
<div>
	<div>
		<p>사원번호</p>
		<p>
			<input type='text' id="sal_no" name='sal_no' value="${sal.SA_no}">
		</p>
	</div>
	<div>
		<p>이 름</p>
		<p>
			<input type='text' id="sa_nm" name='sal_nm' value="${sal.SA_nm}">
		</p>
	</div>
	<div>
		<p>나 이</p>
		<p>
			<input type='text' id="sa_age" name='sal_age' value="${sal.SA_age}">
		</p>
	</div>
	<div>
		<p>성 별</p>
		<p>
			<input type='text' id="sa_sx" name='sal_sx' value="${sal.SA_sx}">
		</p>
	</div>
</div>
<div>
	<div>
		<p>부 서</p>
		<p>
			<c:choose>
				<c:when test="${not empty sal.SA_dpm}">
					<c:forEach items="${sadps}" var="sadp">
						<c:if test="${sadp.cd_grp2 eq sal.SA_dpm}">
							<input type="hidden" id="sa_dpm" name='sal_dpm' value="${sal.SA_dpm }">
							<input type='text' value="${sadp.cd_grp2_nm}">
						</c:if>
					</c:forEach>
				</c:when>
				<c:otherwise>
					<input type="text">
				</c:otherwise>
			</c:choose>
		</p>
	</div>
	<div>
		<p>직 급</p>
		<p>
		<c:choose>
			<c:when test="${not empty sal.SA_gd}">
				<c:forEach items="${psts}" var="pst">
					<c:if test="${pst.cd_grp2 eq sal.SA_gd}">
						<input type="hidden" id="sa_gd" name='sal_gd' value="${sal.SA_gd }">
						<input type="text" value="${pst.cd_grp2_nm }">
					</c:if>
				</c:forEach>
			</c:when>
			<c:otherwise>
				<input type="text">
			</c:otherwise>
		</c:choose>
		</p>
	</div>
	<div>
		<p>주택소유</p>
		<p>
			<input type='text' id="sa_home" name='sal_home' value="${sal.SA_home}">
		</p>
	</div>
	<div>
		<p>차량소유</p>
		<p>
			<input type='text' id="sa_car" name='sal_car' value="${sal.SA_car}">
		</p>
	</div>
</div>
<div>
	<div>
		<p>입사일</p>
		<p>
			<input type='text' id="sa_hd" name='sal_hd' value="${sal.SA_hd}">
		</p>
	</div>
	<div>
		<p>연 봉</p>
		<p>
			<input type='text' id="sa_sal" name='sal_sal' value="${sal.SA_sal}">
		</p>
	</div>
	<div>
		<p>결혼여부</p>
		<p>
			<input type='text' id="sa_marr" name='sal_marr' value="${sal.SA_marr}">
		</p>
	</div>
	<div>
		<p>대출한도</p>
		<p>
			<input type='text' id="coun_max" name='coun_max' value="${max }">
		</p>
	</div>
</div>
</c:when>
<c:when test="${not empty pro }">
<!-- 상품 -->
<div>
	<div>
		<p>상품번호</p>
		<p>
			<input type='text' id="pro_no" name='pro_no' value="${pro.PD_no}">
		</p>
	</div>
	<div>
		<p>상품명</p>
		<p>
			<input type='text' id="pd_nm" name='pro_nm' value="${pro.PD_nm}">
		</p>
	</div>
	<div>
		<p>상환방법</p>
		<p>
			<input type='text' id="pd_pback" name='pro_pback' value="${pro.PD_pback}">
		</p>
	</div>
	<div>
		<p>금리</p>
		<p>
			<input type='text' id="pd_rate" name='pro_rate' value="${pro.PD_rate}">				
		</p>
	</div>
</div>
<div>
	<div>
		<p>상환 기간</p>
		<p>
			<input type='text' id="pd_prd" name='pro_prd' value="${pro.PD_prd}">
		</p>
	</div>
	<div>
		<p>최저한도</p>
		<p>
			<input type='text' id="pd_min" name='pro_min' value="${pro.PD_min}">
		</p>
	</div>
	<div>
		<p>최대한도</p>
		<p>
			<input type='text' id="pd_max" name='pro_max' value="${pro.PD_max}">
		</p>
	</div>
	<div>
		<p>상품 상태</p>
		<p>
			<input type='text' id="pd_yn" name='pro_yn' value="${pro.PD_yn}">
		</p>
	</div>
</div>
</c:when>
<c:otherwise>
	<script type="text/javascript">
		alert("둘다 널임");
	</script>
</c:otherwise>
</c:choose>
</body>
</html>